//
//  BasicConfigurationCodeing.m
//  XTCloud
//
//  Created by QA on 2017/11/27.
//  Copyright © 2017年 ShangHai HaoLei Software Technology Co., Ltd. All rights reserved.
//

#import "BasicConfigurationCodeing.h"

#define kStartDayTime            @"StartDayTime"
#define kEndDayTime              @"EndDayTime"
#define kStartMonthTime          @"StartMonthTime"
#define kEndMonthTime            @"EndMonthTime"

@implementation BasicConfigurationCodeing
@synthesize startDayTime;
@synthesize endDayTime;
@synthesize startMonthTime;
@synthesize endMonthTime;

#pragma mark -
#pragma mark NSCoding

-(void)encodeWithCoder:(NSCoder *)aCoder{//编码
    [aCoder encodeObject:startDayTime forKey:kStartDayTime];
    [aCoder encodeObject:endDayTime forKey:kEndDayTime];
    [aCoder encodeObject:startMonthTime forKey:kStartMonthTime];
    [aCoder encodeObject:endMonthTime forKey:kEndMonthTime];
}

-(id)initWithCoder:(NSCoder *)aDecoder{//解码
    self = [super init];
    if(self){
        startDayTime = [aDecoder decodeObjectForKey:kStartDayTime];
        endDayTime = [aDecoder decodeObjectForKey:kEndDayTime];
        startMonthTime = [aDecoder decodeObjectForKey:kStartMonthTime];
        endMonthTime = [aDecoder decodeObjectForKey:kEndMonthTime];
    }
    return self;
}

#pragma mark -
#pragma mark NSCopying

-(id)copyWithZone:(NSZone *)zone{
    BasicConfigurationCodeing *userInfo = [[[self class] allocWithZone:zone] init];
    userInfo.startDayTime = [self.startDayTime copyWithZone:zone];
    userInfo.endDayTime = [self.endDayTime copyWithZone:zone];
    userInfo.startMonthTime = [self.startMonthTime copyWithZone:zone];
    userInfo.endMonthTime = [self.endMonthTime copyWithZone:zone];
    return userInfo;
}

@end

